/**
 * 等号左右两侧遵循模式匹配原则就是解构
 */

//let [a,b,c,d,e] = [1,2,3,4,5];
//console.log(a,b,c,d,e);

let { name:a,age:b,foo:c } = {name:'zhangsan',age:22,foo:'bar'};
// console.log(name,age,foo);
console.log(a,b,c);

/**
 * 拓展运算符
 */
let obj = {
    name:'larry',
    weight:'20kg',
    gender:'male'
};
let obj1 ={...obj};